home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
dbase
/
dbschn.zip
/
DBSCHN.DOC
next >
Wrap
Text File
|
1992-08-14
|
3KB
|
119 lines
dBase Schema Utility version 1.0 by Dong W. Pak 8/15/92.
DBSCHN.EXE is an utility program for dBase III and up user. Its
intention is to provide a simple way to manage a database. Database
is a collection of data files and index files. This version is
similar to DBSCH.EXE except that DBSCHN.EXE creates/uses NDX index
rather than MDX index. DBSCH.EXE should have named DBSCHM.EXE.
Input to DBSCHN is a schema like file. This file describes the
database. It is a text file. It has its own format and user must
follow the format.
Output from DBSCHN of this version is the database described in the
schema file.
Basic format of the schema file is shown below.
comment area.
#SCHEMA name-of-the-database
comment area.
#DEFINITION
field-name type length decimal ; comment line
...
field-name type length decimal ; comment line
#END DEFINITION
comment area.
#DATAFILE data-file-name
#FIELDS field-name
field-name
...
field-name
#INDEXES index-name unique expression
...
index-name unique expression
#END DATAFILE
comment area.
.... more of #DATAFILE and #END DATAFILEs
#END SCHEMA
comment area.
A line in the file can be blank, predefined word, data, or comment.
Predefined words are "#SCHEMA", "#DEFINITION", "#END DEFINITION",
"#DATAFILE", "#FIELDS", "#INDEXES", "#END DATAFILE", and "#END SCHEMA".
The predefined words are not case sensitive. "name-of-the-database",
"field-name", "type", "length", "decimal", "data-file-name",
"index-name", "unique", and "expression" are considered data.
Comments are words in comment area and words following the ";" only
in "#DEFINITION" block.
Sample schema file might look like below.
This is a sample schema file.
#SCHEMA mydbase
"mydbase" is the name of the database that this schema file
is defining.
#DEFINITION
NAME C 30 0 ; name of a person.
STREET1 C 30 0 ; street
STREET2 C 30 0 ; another street
; there can be more street you know.
CITY C 20 0 ; city
STATE C 2 0 ; 2 character state
ZIPCODE C 5 0 ; which is it 5 or 9.
PHONE C 13 0 ; (XXX)XXX-XXXX
#END DEFINITION
That is the end of mydbase's field definition.
#DATAFILE friends
#FIELDS NAME
STREET1
STREET2
CITY
STATE
ZIPCODE
PHONE
#INDEXES NAME N NAME
PHONE Y PHONE
ZIPCODE N ZIPCODE+NAME
#END DATAFILE
That is the end of data fiel definition.
We'll define only one data file for now.
#END SCHEMA
That indicates the end of our sample schema file.
To use the above schema file, type DBSCHN and <RETURN>.
That will provide usage information.
If a command you selected does not do anything then it is not
yet implemented.
The program is shareware, there is no fee in using or distributing
the program.
Write to me at Route 1 Box 1724-7, Bowersville, GA 30516 for
any kind of help, critiques, or requests.